<!doctype html>
<script>
function test()
{
    if (document.location.search == "?log") {
        if (document.referrer == "")
            document.body.innerText = "PASS: Referrer is empty";
        else
            document.body.innerText = "FAIL: Referrer is '" + document.referrer + "'";
        if (window.testRunner)
            testRunner.notifyDone();
    } else if (document.location.search == "?frame") {
        parent.location = "http://127.0.0.1:8000/security/resources/referrer-on-client-redirect.html?log";
    } else {
        var iframe = document.createElement("iframe");
        iframe.src = "https://127.0.0.1:8443/security/resources/referrer-on-client-redirect.html?frame";
        document.body.appendChild(iframe);
    }
}
</script>
<body onload="test()"></body>
